<include file="Common:header"/>
<style>
.login_background{
	width: 100%;
	text-align: center;
	height: 48%; 
	border:0px solid black;
}
body{
	background-color: #F1F1F1;
}
.login_bth{
    width: 95%;
    border-radius: 6px;
    margin-top: 20px;
    line-height: 22px;
    padding: 10px;
    font-size: 14px;
    color: #fff;
    background-color: #2ebc82;
}
.pwd_reon{
	margin-top:20px;
}
.pwd_reon a{
	display: inline-block;
	width: 100%;
	text-align: center;
	color:#277BC4;
}
.site_option{
	margin-top: 20px;
	text-align: center;
	color:#6E7175;
}
.not_reg{
	margin-top:15px;
	font-weight:normal;
	color:#E86767;
	font-size: 15px;
}
.login_background{background-position: relative;}
.inptxt154{
	z-index: 10;
}
.clear_bth{
	width:11%;
	height:37px;
	background: url(__PUBLIC__/img/clear.png) no-repeat;
	background-position: 71% 52%;
	background-size: 71%;
	position: absolute;
	right:18px;
	top:84px;
	z-index:1000;
	display: none;
}
.clear_bth_pwd{
	width:11%;
	height:37px;
	background: url(__PUBLIC__/img/clear.png) no-repeat;
	background-position: 71% 52%;
	background-size: 71%;
	position: absolute;
	right:18px;
	top:143px;
	z-index:1000;
	display: none;
}
</style>

<body class="login">
	<div class="header"><{$opt['site_name']}></div>
	<div class="form_content">
		<div class="form-input">
			<div class="user_name">
				<label for="mobile" class="label_font">手机号码：</label>
				<input class="input_e_i" type="tel" pattern="\d*" name="mobile" placeholder="填写11位手机号">
			</div>
		</div>
		<div class="form-input">
			<div class="user_name">
				<label for="captcha" class="label_font">密码：</label>
				<input class="input_e_i" type="password" name="password" placeholder="6-16位英文和数字">
			</div>
		</div>
		<div class="max_box">
			<div class="form-input">
				<button class="input_e_s" onclick="_login(this);">
					登&nbsp;&nbsp;录
				</button>
			</div>
		</div>
	</div>
	<div class="content">
		<div class="pwd_reon">
		<!-- 没有登录的情况下，进入重置密码页面不显示底部菜单 -->
			<a href="<{:U('Home/Login/reset_password',array('m_b'=>'none'))}>">忘记密码？</a>
		</div>
		<!-- <div class="site_option">
			粤IPC备15091564号-3
		</div> -->
	</div>
</body>
</html>
<script>

function _login(obj){

	var mobile = $('input[name="mobile"]').val();
	var password = $('input[name="password"]').val();
	
	if(mobile == ''){
		layer.open({
			content:"请输入手机号码！"
		});
		return false;
	}
	
	if(password == ''){
		layer.open({
			content:"请输入密码！"
		});
		return false;
	}
	
	 var reg = /^((\(\d{2,3}\))|(\d{3}\-))?1[3|4|5|7|8]\d{9}$/;
     if(!reg.test(mobile)){
        layer.open({
			content:"请输入有效的手机号码！"
		});
         document.form1.mobile.focus();
         return false;
     }
	
	if($(obj).attr('readonly')){
		return false;
	}
	$(obj).attr('readonly','readonly');
	
	$.post("<{:U('Home/Login/login')}>",{"mobile":mobile,"password":password},function(r){
		if(r.status == '1'){
			window.location.href = r.url;
		 }else{
			layer.open({
				content:r.msg
			});
		 }
		 $(obj).removeAttr('readonly');
	},'json');
	
	return false;
}




</script> 